//
//  RUSportViewController.m
//  runtorun
//
//  Created by KIMI on 16/10/21.
//  Copyright © 2016年 KIMI. All rights reserved.
//
//运动模块主界面
#import "RUSportViewController.h"
#import "RUMapViewController.h"

@interface RUSportViewController ()

@end

@implementation RUSportViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    [self setupMapViewController];
}

- (void)setupMapViewController {
    
    //实例化地图控制器
    RUMapViewController *mapVc = [[RUMapViewController alloc]init];
    //添加到当前控制器
    [self addChildViewController:mapVc];
    //添加子视图
    [self.view addSubview:mapVc.view];
    //完成控制器的添加
    [mapVc didMoveToParentViewController:self];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
